import React from 'react'
import { useLocation } from 'react-router-dom'

type Props = {}

export default function P2({}: Props) {
  let location = useLocation()
  console.log('p2-state传参',location);
  let {state} = location
  return (
    <div>2号产品,{state?state.name:''}</div>
  )
}